<?php


namespace app\home\behavior;


use think\Response;

class CORS
{
    public function appInit(&$params)
    {
        if (strtoupper(request()->method()) == "OPTIONS") {
            return Response::create()->send();
        }
    }

}